-- GENERATED SPELL FOR [Spirestone Mystic] --


function spell0_9198(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(15659,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9198', 3000, 1)
end

function spell1_9198(pUnit, Event) --@Forked Lightning,n/a--
pUnit:FullCastSpellOnTarget(8435,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9198', 2000, 1)
end

function spell2_9198(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(15982,pUnit)
pUnit:RegisterEvent('Sorts_9198', 3000, 1)
end

function spell3_9198(pUnit, Event) --@Rejuvenation,Heal--
pUnit:FullCastSpellOnTarget(15981,pUnit)
pUnit:RegisterEvent('Sorts_9198', 12000, 1)
end

function Sorts_9198(pUnit, Event)
local choix_sorts_9198 = math.random(0, 3)
if choix_sorts_9198 == 0 then
pUnit:RegisterEvent('spell0_9198', 1, 1)
end
if choix_sorts_9198 == 1 then
pUnit:RegisterEvent('spell1_9198', 1, 1)
end
if choix_sorts_9198 == 2 then
pUnit:RegisterEvent('spell2_9198', 1, 1)
end
if choix_sorts_9198 == 3 then
pUnit:RegisterEvent('spell3_9198', 1, 1)
end
end

function mob9198_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9198', math.random(1500, 3000), 1)
end

function mob9198_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9198_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9198_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9198, 1, 'mob9198_Action')
RegisterUnitEvent(9198, 2, 'mob9198_Leave')
RegisterUnitEvent(9198, 3, 'mob9198_Kill')
RegisterUnitEvent(9198, 4, 'mob9198_Die')
